package day08;

import java.util.Scanner;

/**
 * @author Xiao
 * @date 2021/7/9
 */
public class ReplaceString {
    /**
     *      敏感词替换
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String s = sc.nextLine();
        System.out.println("--------------");
        String s1 = s.replace("TMD", "***");    //  挺萌的
        String s2 = s.replace('T','M');
        System.out.println(s1);
        System.out.println(s2);
    }

}
